﻿@{
    ViewBag.Title = "View1";
    Layout = "~/Views/Muban.cshtml";
}
<link href="~/PublicPage_css/style/css.css" rel="stylesheet" />
<!-- //主模板必须要引入{dede:global.cfg_cmsurl/}/include/dedeajax2.js -->

<div style="">
    <div>
        <img src="" alt=""  style="height:260px;width:260px;"/><br />
        <input type="button" name="name" value="上传头像" />
    </div>
    
    </div>

<div >
    <div class="title"><span>2012-5-6 12:30 发布</span><a href="#">请一个同学来回答一下请一个同学来回</a></div>
    <div class="content"><p>上课的时候不小心走神了，突然听见老师说＂请一个同学来回答一下＂，我瞬间精神，就怕老师喊我名字！可是！！！我明明已经是坐在后面听课的老师了！上课的时候不小心走神了，突然听见老师说＂请一个同学来回答一下＂，我瞬间精神，就怕老师喊我名字！可是！！！我明明已经是坐在后面听课的老师了！上课的时候不小心走神了，突然听见老师说＂请一个同学来回答一下＂，我瞬间精神，就怕老师喊我名字！可是！！！我明明已经是坐在后面听课的老师了！上课的时候不小心走神了，突然听见老师说＂请一个同学来回答一下＂，我瞬间精神，就怕老师喊我名字！可是！！！我明明已经是坐在后面听课的老师了！</p></div>
    <div class="tages">标签：<a href="#">名字</a><a href="#">名字</a></div>
    <div class="bar">
        <div class="bar_box left">
            <div class="up left"><a href="#">15085</a></div>
            <div class="down left"><a href="#">15085</a></div>
        </div>
    </div>
    <div id="feedback">
        <div class="feedback">
            <div class="fedpost">
                <a name='postform'></a>
                <div class="textinfo">用户评论</div>
                <form action="#" method="post" name="feedback">
                    <div class="plimg">

                        <ul>
                            <li><input type="radio" name='face' value='1' checked="1" id="1" /><label for="1" class="mood1" title="感动到了"></label></li>
                            <li><input type="radio" name='face' value='2' id="2" /><label for="2" class="mood2" title="献花安慰"></label></li>
                            <li><input type="radio" name='face' value='3' id="3" /><label for="3" class="mood3" title="很给力顶一个"></label></li>
                            <li><input type="radio" name='face' value='4' id="4" /><label for="4" class="mood4" title="不给力啊"></label></li>
                            <li><input type="radio" name='face' value='5' id="5" /><label for="5" class="mood5" title="扮个鬼脸"></label></li>
                            <li><input type="radio" name='face' value='6' id="6" /><label for="6" class="mood6" title="好委屈"></label></li>
                            <li><input type="radio" name='face' value='7' id="7" /><label for="7" class="mood7" title="为你祈祷"></label></li>
                            <li><input type="radio" name='face' value='8' id="8" /><label for="8" class="mood8" title="太搞笑啦"></label></li>
                        </ul>

                    </div>
                    <input type="hidden" name="dopost" value="send" />
                    <input type="hidden" name="comtype" value="comments">
                    <input type="hidden" name="aid" value="{dede:field name=" id" />
                    <input type="hidden" name="fid" id='feedbackfid' value="0" />
                    <textarea cols="60" name="msg" rows="5" class="text_area" id="textarea"></textarea>
                    <div class="userinfo" id="_ajax_feedback">
                        <input type="checkbox" name="notuser" id="dcmp-submit-guest" />匿名评论
                    </div>

                    <div class="fedpost-btm"><a href="###" hidefocus="true" class="subbtn" onclick='PostComment()'>回复评论</a></div>
                </form>
            </div>

            <!-- //评论内容区 -->
            <div class="fedhas">
                <a name='commettop'></a>
                <div class="fednum">
                    <b>
                        已经有
                        <script src="{dede:field name='phpurl'/}/count.php?view=yes&aid={dede:field name='id'/}&mid={dede:field name='mid'/}" type='text/javascript' language="javascript"></script>人悄悄飘过，不留下点什么会有遗憾的
                    </b>
                </div>
                <div class="fedlist">
                    <ul>
                        <dd id='commetcontentNew'></dd>
                        <dd id='commetcontent'></dd>
                    </ul>
                </div>
            </div>

        </div>
        <!--
        //由于评论载入时使用异步传输，因此必须在最后一步加载（DIGG和评论框须放在评论内容前面）
        //如果一定需要提前的把myajax.SendGet改为myajax.SendGet2，但可能会引起页面阻滞
        -->
        <script language='javascript'>
            function LoadCommets(page) {
                var taget_obj = document.getElementById('commetcontent');
                var waithtml = "<div style='line-height:50px'><img src='{dede:global.cfg_cmsurl/}/images/loadinglit.gif' />评论加载中...</div>";
                var myajax = new DedeAjax(taget_obj, true, true, '', 'x', waithtml);
                myajax.SendGet2("{dede:global.cfg_phpurl /}/feedback_ajax.php?dopost=getlist&aid={dede:field.id/}&page=" + page);
                DedeXHTTP = null;
            }
            function PostComment() {
                var f = document.feedback;
                var nface = '6';
                var nfeedbacktype = 'feedback';
                var nvalidate = '';
                var nnotuser = '';
                var nusername = '';
                var npwd = '';
                var taget_obj = $DE('commetcontentNew');
                var waithtml = "<div style='line-height:30px'><img src='{dede:global.cfg_cmsurl/}/images/loadinglit.gif' />正在发送中...</div>";
                if (f.msg.value == '') {
                    alert("评论内容不能为空！");
                    return;
                }
                if (f.msg.value.length > 200) {
                    alert("你的评论是不是太长了？请填写200字以内的评论。");
                    return;
                }
                if (f.feedbacktype) {
                    for (var i = 0; i < f.feedbacktype.length; i++)
                        if (f.feedbacktype[i].checked) nfeedbacktype = f.feedbacktype[i].value;
                }
                if (f.face) {
                    for (var j = 0; j < f.face.length; j++)
                        if (f.face[j].checked) nface = f.face[j].value;
                }
                if (f.notuser.checked) nnotuser = '1';
                if (f.username) nusername = f.username.value;
                if (f.pwd) npwd = f.pwd.value;

                var myajax = new DedeAjax(taget_obj, false, true, '', '', waithtml);
                myajax.sendlang = '{dede:global.cfg_soft_lang/}';
                myajax.AddKeyN('dopost', 'send');
                myajax.AddKeyN('aid', '{dede:field.id/}');
                myajax.AddKeyN('fid', f.fid.value);
                myajax.AddKeyN('face', nface);
                myajax.AddKeyN('feedbacktype', nfeedbacktype);
                myajax.AddKeyN('validate', nvalidate);
                myajax.AddKeyN('notuser', nnotuser);
                myajax.AddKeyN('username', nusername);
                myajax.AddKeyN('pwd', npwd);
                myajax.AddKeyN('msg', f.msg.value);
                myajax.SendPost2('{dede:global.cfg_phpurl/}/feedback_ajax.php');
                f.msg.value = '';
                f.fid.value = 0;
                if (f.validate) {
                    if ($DE('validateimg')) $DE('validateimg').src = "{dede:global.cfg_cmsurl/}/include/vdimgck.php?" + f.validate.value;
                    f.validate.value = '';
                }
            }
            function quoteCommet(fid) {
                document.feedback.fid.value = fid;
            }
            LoadCommets(1);
        </script><!-- //评论内容区结束 -->
    </div>
</div>